feat: scope check for babysit-pr, extract babysit-open-prs skill#88
feat: scope check for babysit-pr, extract babysit-open-prs skill#88
Conversation
…\n- babysit-pr: added Scope Check step that runs before the fix loop.\n Compares PR diff/commits against title/description, flags drift as\n MINOR (continue) or MAJOR (escalate). Scope findings in all reports.\n- babysit-open-prs: new skill extracted from cron inline prompt.\n Adds SCOPE_DRIFT as fourth triage classification. Cron job now\n references this skill file instead of inlining the orchestrator.
|
Claude finished @exiao's task in 59s —— View job Review Complete
Result: Approved All five issues from the previous review are fixed in
No new issues found. Frontmatter is accurate, no hardcoded secrets, references follow repo conventions, and the two skills are internally consistent. |
babysit-pr/SKILL.md
Outdated
|
|
||
| ## Reporting | ||
|
|
||
| Send progress updates to the parent agent via `sessions_send`. Do NOT try to send messages to Signal/Slack/etc directly (sub-agents don't have channel access). The parent agent handles delivery to the user. |
There was a problem hiding this comment.
Text says sessions_send but the code block on line 202 and the input description on line 14 both use send_to_task. This should be consistent.
| Send progress updates to the parent agent via `sessions_send`. Do NOT try to send messages to Signal/Slack/etc directly (sub-agents don't have channel access). The parent agent handles delivery to the user. | |
| Send progress updates to the parent agent via `send_to_task`. Do NOT try to send messages to Signal/Slack/etc directly (sub-agents don't have channel access). The parent agent handles delivery to the user. |
babysit-pr/SKILL.md
Outdated
| # Get base branch for comparison | ||
| BASE=$(gh pr view $PR --repo $REPO --json baseRefName -q '.baseRefName') |
There was a problem hiding this comment.
BASE is computed but never referenced again. Either use it (e.g., in the per-commit loop) or remove it to avoid confusion.
| # Get base branch for comparison | |
| BASE=$(gh pr view $PR --repo $REPO --json baseRefName -q '.baseRefName') |
| ``` | ||
| sessions_spawn({ | ||
| task: "Use the babysit-pr skill. PR #<number>, repo <repo>. Max cycles: 5. Reasons flagged: <reasons>. Running via nightly cron (use pr-mark-skip.sh if escalating). Read the repo's CLAUDE.md/AGENTS.md first.", | ||
| cwd: "<local-path>", |
There was a problem hiding this comment.
runTimeoutSeconds here vs run_timeout_seconds in babysit-pr/SKILL.md:25. Pick one convention across both skills.
There was a problem hiding this comment.
Three issues to fix:
-
sessions_sendvssend_to_taskmismatch (babysit-pr/SKILL.md:198): Prose sayssessions_sendbut code block and input description both usesend_to_task. Should besend_to_task. -
Unused
BASEvariable (babysit-pr/SKILL.md:73-74): Computed but never referenced. Remove it or use it. -
Inconsistent timeout param casing:
babysit-prusesrun_timeout_seconds(snake_case) whilebabysit-open-prsusesrunTimeoutSeconds(camelCase). Pick one.
Also: README.md needs updating — babysit-open-prs is a new skill directory but isn't listed in the README. Per repo rules, every skill must appear in the README under the correct category.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4de08669b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| --- | ||
| name: babysit-open-prs | ||
| description: "Scan all open PRs across tracked repos, triage them, check for scope drift, and spawn babysit-pr sub-agents for fixable ones. Use when: babysit all PRs, check all open PRs, nightly PR review." |
There was a problem hiding this comment.
Add babysit-open-prs to README index
This commit introduces a new root skill directory (babysit-open-prs/) but does not add it to README.md, which violates the repo convention that every skill must be listed for discovery/routing. Leaving the index stale can break contributor workflows and CI checks that validate README coverage when skills are added.
Useful? React with 👍 / 👎.
babysit-open-prs/SKILL.md
Outdated
|
|
||
| Local paths: | ||
| - bloom-invest/bloom → ~/bloom | ||
| - bloom-invest/investing-log → ~/agentd/investing-log |
There was a problem hiding this comment.
Use the canonical path for investing-log
The local path mapping points bloom-invest/investing-log to ~/agentd/investing-log, but the existing skill conventions in this repo use ~/clawd/investing-log and babysit-pr searches ~/clawd/$REPO_DIR (not ~/agentd). In environments following the current convention, spawning sub-agents with this cwd will fail before any PR work starts.
Useful? React with 👍 / 👎.
| If a parent session key was provided, use: | ||
| ``` | ||
| sessions_send(sessionKey="<parent_session_key>", message="<status update>") | ||
| send_to_task(sessionKey="<parent_session_key>", message="<status update>") |
There was a problem hiding this comment.
Standardize parent update call naming
The reporting instructions now show send_to_task(...), but this skill still states progress is sent via sessions_send, creating conflicting guidance in one section. That ambiguity can cause sub-agents to use the wrong API and silently miss parent status updates; the doc should use one API name consistently.
Useful? React with 👍 / 👎.
- Fix sessions_send → send_to_task naming in babysit-pr prose - Remove unused BASE variable from scope check script - Standardize timeout param to snake_case (run_timeout_seconds) - Fix investing-log path to ~/clawd/investing-log - Add babysit-open-prs to README Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
LGTM — reviewed both skill files for frontmatter, secrets, broken references, and internal consistency. All five issues from the previous review (sessions_send naming, unused BASE var, timeout casing, README entry, agentd path) are fixed in 29572c7.
Changes
babysit-prskill (updated)babysit-open-prsskill (new)babysit-open-prscron job inline prompt into a proper skill fileSCOPE_DRIFTas a fourth triage classification alongside CLEAN/FIXABLE/SKIPd3caa281) updated to reference this skill instead of inlining the promptCron update
babysit-open-prscron now just says "Read the skill and follow it" (consistent with other cron jobs like content-pipeline, market-daily-briefing)